import request from '@/utils/request'

// 查询菜单列表
export function listMenu(data) {
  return request({
    url: '/menu/index',
    method: 'post',
    data: data
  })
}

// 查询菜单详细
export function getMenu(data) {
  return request({
    url: '/menu/detail',
    method: 'post',
    data: data
  })
}

// 查询菜单下拉树结构
export function treeselect(data) {
  return request({
    url: '/menu/tree_list',
    method: 'post',
    data: data
  })
}

// 根据角色ID查询菜单下拉树结构
export function roleMenuTreeselect(data) {
  return request({
    url: '/menu/tree_list',
    method: 'post',
    data: data
  })
}

// 新增菜单
export function addMenu(data) {
  return request({
    url: '/menu/create',
    method: 'post',
    data: data
  })
}

// 修改菜单
export function updateMenu(data) {
  return request({
    url: '/menu/update',
    method: 'post',
    data: data
  })
}

// 删除菜单
export function delMenu(data) {
  return request({
    url: '/menu/delete',
    method: 'post',
    data: data
  })
}